/** When your routing table is too long, you can split it into small modules**/

import Layout from '@/layout'

const couponRouter = {
  path: '/coupon',
  component: Layout,
  redirect: 'noRedirect',
  name: 'Coupon',
  alwaysShow: true,
  meta: {
    title: '优惠券管理',
    icon: 'coupon',
    permission: '/coupon'
  },
  children: [
    {
      path: 'template',
      component: () => import('@/views/coupon/template/index'),
      name: 'Template',
      meta: { title: '优惠券模板', icon: 'couponTemplate', noCache: true, permission: '/coupon/template' }
    },
    {
      path: 'record',
      component: () => import('@/views/coupon/record/index'),
      name: 'Record',
      meta: { title: '优惠券记录', icon: 'record', noCache: true, permission: '/coupon/record' }
    },
    {
      path: 'used',
      component: () => import('@/views/coupon/used/index'),
      name: 'Used',
      meta: { title: '已用券', icon: 'used', noCache: true, permission: '/coupon/used' }
    },
    {
      path: 'expire',
      component: () => import('@/views/coupon/expire/index'),
      name: 'Expire',
      meta: { title: '已过期券', icon: 'expire', noCache: true, permission: '/coupon/expire' }
    }
  ]
}

export default couponRouter
